<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <test>
      <span>你真好</span>
      <span slot="bottom">你真好----bottom</span>
      <div slot="top">header</div>
    </test>
  </div>
  <script src="./vue.js"></script>
  <script>
    Vue.component('test', {
      template: `<div>
        <slot name="top"></slot>
        <h2>我是test</h2>
        <div class="box">
          <slot></slot>
        </div>
        <slot name="bottom"></slot>
      </div>`
    })
    new Vue({
      el: '#app'
    })
  </script>
</body>
</html>